3.3.77 \(\int \frac {(A+B \log (\frac {e (a+b x)^2}{(c+d x)^2}))^2}{(f+g x)^2} \, dx\) [277]

3.3.77.1 Optimal result
3.3.77.2 Mathematica [B] (verified)
3.3.77.3 Rubi [A] (verified)
3.3.77.4 Maple [F]
3.3.77.5 Fricas [F]
3.3.77.6 Sympy [F(-1)]
3.3.77.7 Maxima [F]
3.3.77.8 Giac [F]
3.3.77.9 Mupad [F(-1)]

3.3.77.1 Optimal result

Integrand size = 31, antiderivative size = 200 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\frac {(a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(b f-a g) (f+g x)}+\frac {4 B (b c-a d) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{(b f-a g) (d f-c g)}+\frac {8 B^2 (b c-a d) \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{(b f-a g) (d f-c g)} \]

output
(b*x+a)*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/(-a*g+b*f)/(g*x+f)+4*B*(-a*d+b*c 
)*(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))*ln(1-(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x+ 
c))/(-a*g+b*f)/(-c*g+d*f)+8*B^2*(-a*d+b*c)*polylog(2,(-c*g+d*f)*(b*x+a)/(- 
a*g+b*f)/(d*x+c))/(-a*g+b*f)/(-c*g+d*f)
 
3.3.77.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(409\) vs. \(2(200)=400\).

Time = 0.29 (sec) , antiderivative size = 409, normalized size of antiderivative = 2.04 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\frac {-\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x}+\frac {4 B \left (b (d f-c g) \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )-d (b f-a g) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (c+d x)+(b c-a d) g \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)-b B (d f-c g) \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )+B d (b f-a g) \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )-2 B (b c-a d) g \left (\left (\log \left (\frac {g (a+b x)}{-b f+a g}\right )-\log \left (\frac {g (c+d x)}{-d f+c g}\right )\right ) \log (f+g x)+\operatorname {PolyLog}\left (2,\frac {b (f+g x)}{b f-a g}\right )-\operatorname {PolyLog}\left (2,\frac {d (f+g x)}{d f-c g}\right )\right )\right )}{(b f-a g) (d f-c g)}}{g} \]

input
Integrate[(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2/(f + g*x)^2,x]
 
output
(-((A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2/(f + g*x)) + (4*B*(b*(d*f - 
c*g)*Log[a + b*x]*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2]) - d*(b*f - a*g) 
*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*Log[c + d*x] + (b*c - a*d)*g*(A 
+ B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*Log[f + g*x] - b*B*(d*f - c*g)*(Log[ 
a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, 
(d*(a + b*x))/(-(b*c) + a*d)]) + B*d*(b*f - a*g)*((2*Log[(d*(a + b*x))/(-( 
b*c) + a*d)] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b* 
c - a*d)]) - 2*B*(b*c - a*d)*g*((Log[(g*(a + b*x))/(-(b*f) + a*g)] - Log[( 
g*(c + d*x))/(-(d*f) + c*g)])*Log[f + g*x] + PolyLog[2, (b*(f + g*x))/(b*f 
 - a*g)] - PolyLog[2, (d*(f + g*x))/(d*f - c*g)])))/((b*f - a*g)*(d*f - c* 
g)))/g
 
3.3.77.3 Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.08, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {2954, 2755, 2754, 2838}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{(f+g x)^2} \, dx\)

\(\Big \downarrow \) 2954

\(\displaystyle (b c-a d) \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{\left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )^2}d\frac {a+b x}{c+d x}\)

\(\Big \downarrow \) 2755

\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {4 B \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}}d\frac {a+b x}{c+d x}}{b f-a g}\right )\)

\(\Big \downarrow \) 2754

\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {4 B \left (\frac {2 B \int \frac {(c+d x) \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{d f-c g}-\frac {\log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{d f-c g}\right )}{b f-a g}\right )\)

\(\Big \downarrow \) 2838

\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {4 B \left (-\frac {\log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{d f-c g}-\frac {2 B \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{d f-c g}\right )}{b f-a g}\right )\)

input
Int[(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2/(f + g*x)^2,x]
 
output
(b*c - a*d)*(((a + b*x)*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2)/((b*f 
- a*g)*(c + d*x)*(b*f - a*g - ((d*f - c*g)*(a + b*x))/(c + d*x))) - (4*B*( 
-(((A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*Log[1 - ((d*f - c*g)*(a + b*x) 
)/((b*f - a*g)*(c + d*x))])/(d*f - c*g)) - (2*B*PolyLog[2, ((d*f - c*g)*(a 
 + b*x))/((b*f - a*g)*(c + d*x))])/(d*f - c*g)))/(b*f - a*g))
 

3.3.77.3.1 Defintions of rubi rules used

rule 2754
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symb 
ol] :> Simp[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^p/e), x] - Simp[b*n*(p/e) 
  Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, 
b, c, d, e, n}, x] && IGtQ[p, 0]
 

rule 2755
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Sy 
mbol] :> Simp[x*((a + b*Log[c*x^n])^p/(d*(d + e*x))), x] - Simp[b*n*(p/d) 
 Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, 
n, p}, x] && GtQ[p, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2954
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d) 
 Subst[Int[(b*f - a*g - (d*f - c*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m 
 + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B 
, n}, x] && EqQ[n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && IntegerQ[m 
] && IGtQ[p, 0]
 
3.3.77.4 Maple [F]

\[\int \frac {{\left (A +B \ln \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )\right )}^{2}}{\left (g x +f \right )^{2}}d x\]

input
int((A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f)^2,x)
 
output
int((A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f)^2,x)
 
3.3.77.5 Fricas [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f)^2,x, algorithm="frica 
s")
 
output
integral((B^2*log((b^2*e*x^2 + 2*a*b*e*x + a^2*e)/(d^2*x^2 + 2*c*d*x + c^2 
))^2 + 2*A*B*log((b^2*e*x^2 + 2*a*b*e*x + a^2*e)/(d^2*x^2 + 2*c*d*x + c^2) 
) + A^2)/(g^2*x^2 + 2*f*g*x + f^2), x)
 
3.3.77.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\text {Timed out} \]

input
integrate((A+B*ln(e*(b*x+a)**2/(d*x+c)**2))**2/(g*x+f)**2,x)
 
output
Timed out
 
3.3.77.7 Maxima [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f)^2,x, algorithm="maxim 
a")
 
output
2*A*B*(2*b*log(b*x + a)/(b*f*g - a*g^2) - 2*d*log(d*x + c)/(d*f*g - c*g^2) 
 + 2*(b*c - a*d)*log(g*x + f)/(b*d*f^2 + a*c*g^2 - (b*c + a*d)*f*g) - log( 
b^2*e*x^2/(d^2*x^2 + 2*c*d*x + c^2) + 2*a*b*e*x/(d^2*x^2 + 2*c*d*x + c^2) 
+ a^2*e/(d^2*x^2 + 2*c*d*x + c^2))/(g^2*x + f*g)) - B^2*(4*log(d*x + c)^2/ 
(g^2*x + f*g) + integrate(-(d*g*x*log(e)^2 + c*g*log(e)^2 + 4*(d*g*x + c*g 
)*log(b*x + a)^2 + 4*(d*g*x*log(e) + c*g*log(e))*log(b*x + a) - 4*((g*log( 
e) - 2*g)*d*x + c*g*log(e) - 2*d*f + 2*(d*g*x + c*g)*log(b*x + a))*log(d*x 
 + c))/(d*g^3*x^3 + c*f^2*g + (2*d*f*g^2 + c*g^3)*x^2 + (d*f^2*g + 2*c*f*g 
^2)*x), x)) - A^2/(g^2*x + f*g)
 
3.3.77.8 Giac [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f)^2,x, algorithm="giac" 
)
 
output
integrate((B*log((b*x + a)^2*e/(d*x + c)^2) + A)^2/(g*x + f)^2, x)
 
3.3.77.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(f+g x)^2} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )\right )}^2}{{\left (f+g\,x\right )}^2} \,d x \]

input
int((A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2/(f + g*x)^2,x)
 
output
int((A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2/(f + g*x)^2, x)